﻿using System.Windows.Input;

namespace KinonekoSoftware.Foundation.UX.Controls
{
    public sealed class ForumThread : ContentControl
    {

        public static readonly StyledProperty<string>     PosterNameProperty         = AvaloniaProperty.Register<ForumThread, string>(nameof(PosterName));
        public static readonly StyledProperty<string>     ReplyCommandTitleProperty  = AvaloniaProperty.Register<ForumThread, string>(nameof(ReplyCommandTitle));
        public static readonly StyledProperty<string>     EditCommandTitleProperty   = AvaloniaProperty.Register<ForumThread, string>(nameof(EditCommandTitle));
        public static readonly StyledProperty<string>     RemoveCommandTitleProperty = AvaloniaProperty.Register<ForumThread, string>(nameof(RemoveCommandTitle));
        public static readonly StyledProperty<ImageBrush> PosterGravatarProperty     = AvaloniaProperty.Register<ForumThread, ImageBrush>(nameof(PosterGravatar));
        public static readonly StyledProperty<ICommand>   ReplyCommandProperty       = AvaloniaProperty.Register<ForumThread, ICommand>(nameof(ReplyCommand));
        public static readonly StyledProperty<ICommand>   EditCommandProperty        = AvaloniaProperty.Register<ForumThread, ICommand>(nameof(EditCommand));
        public static readonly StyledProperty<ICommand>   RemoveCommandProperty      = AvaloniaProperty.Register<ForumThread, ICommand>(nameof(RemoveCommand));
        public static readonly StyledProperty<int>        LikeAmountProperty         = AvaloniaProperty.Register<ForumThread, int>(nameof(LikeAmount));
        public static readonly StyledProperty<int>        DislikeAmountProperty      = AvaloniaProperty.Register<ForumThread, int>(nameof(DislikeAmount));
        public static readonly StyledProperty<ICommand>   LikeCommandProperty        = AvaloniaProperty.Register<ForumThread, ICommand>(nameof(LikeCommand));
        public static readonly StyledProperty<ICommand>   DislikeCommandProperty     = AvaloniaProperty.Register<ForumThread, ICommand>(nameof(DislikeCommand));
        public static readonly StyledProperty<object>     CommandParameterProperty   = AvaloniaProperty.Register<ForumThread, object>(nameof(CommandParameter));


        
        public object CommandParameter
        {
            get => GetValue(CommandParameterProperty);
            set => SetValue(CommandParameterProperty, value);
        }


        public ICommand LikeCommand
        {
            get => GetValue(LikeCommandProperty);
            set => SetValue(LikeCommandProperty, value);
        }


        public ICommand DislikeCommand
        {
            get => GetValue(DislikeCommandProperty);
            set => SetValue(DislikeCommandProperty, value);
        }

        public int DislikeAmount
        {
            get => GetValue(DislikeAmountProperty);
            set => SetValue(DislikeAmountProperty, value);
        }

        public int LikeAmount
        {
            get => GetValue(LikeAmountProperty);
            set => SetValue(LikeAmountProperty, value);
        }

        public ICommand RemoveCommand
        {
            get => GetValue(RemoveCommandProperty);
            set => SetValue(RemoveCommandProperty, value);
        }

        public ICommand EditCommand
        {
            get => GetValue(EditCommandProperty);
            set => SetValue(EditCommandProperty, value);
        }

        public ICommand ReplyCommand
        {
            get => GetValue(ReplyCommandProperty);
            set => SetValue(ReplyCommandProperty, value);
        }

        public string RemoveCommandTitle
        {
            get => GetValue(RemoveCommandTitleProperty);
            set => SetValue(RemoveCommandTitleProperty, value);
        }

        public string EditCommandTitle
        {
            get => GetValue(EditCommandTitleProperty);
            set => SetValue(EditCommandTitleProperty, value);
        }

        public string ReplyCommandTitle
        {
            get => GetValue(ReplyCommandTitleProperty);
            set => SetValue(ReplyCommandTitleProperty, value);
        }

        public ImageBrush PosterGravatar
        {
            get => GetValue(PosterGravatarProperty);
            set => SetValue(PosterGravatarProperty, value);
        }

        public string PosterName
        {
            get => GetValue(PosterNameProperty);
            set => SetValue(PosterNameProperty, value);
        }
    }
}